<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var arr1 = new Array();
        var arr2 = [];
        var arr3 = [1, 2, 3, 'pink', true];
        console.log(arr1);
        console.log(arr2);
        console.log(arr3);
        console.log(arr3[3]);
        var a = '';
        for (var i = 0; i < arr3.length; i++) {
            a += arr3[i] + '|'
        }
        console.log(a);
        var arr4 = [2, 0, 6, 1, 77, 0, 52, 0, 25, 7];
        var arr5 = [];
        var j = 0;
        for (var i = 0; i < arr4.length; i++) {
            if (arr4[i] >= 10) {
                arr5[j] = arr4[i];
                // arr5[arr5.length] = arr4[i];
                j++;
            }
        }
        console.log(arr5);
        var arr = [1, 2, 3];
        var a1 = new Array();
        var a2 = new Array(2); //长度为2,元素为空
        var a3 = new Array(2, 3); //长度为2，元素[2,3]
        var b = [1, 2, 13, 9, 5, 6, 7, 77, 8];
        b.pop();
        console.log(b);
        console.log(b.reverse());

        console.log(b.sort(function(a, b) {
            return a - b;
        }));
    </script>
</head>

<body>

</body>

</html>